using System.ComponentModel;
using System.Windows.Forms;

namespace FlickrShots.GUI.controls
{
	public class AboutControl : UserControl
	{
        private Label AboutLabel;
        private LinkLabel flickrLink;
        private PictureBox pictureBox2;
        private PictureBox buddyIconPicture;
        private Label version;
        private Panel panel1;
        private Panel panel2;
        private Panel panel3;
        private Panel panel4;
        private Panel panel5;
        private Panel panel6;
        private LinkLabel casademoraFlickrLink;
        private LinkLabel casademoraLink;
        private LinkLabel projectLink;
        private Label casademoraFlickrSample;

		private Container components = null;

//		public AboutControl()
//		{
//			InitializeComponent();
//		}
//
//        private bool _isInitialized = false;
//        public void Initialize()
//        {
//            if (!_isInitialized)
//            {
//                this.buddyIconPicture.Image = GetBuddyIcon();
//                this.casademoraFlickrSample.Image = GetCasademoraImage();
//                _isInitialized = true;
//            }
//        }
//
//	    private Image GetCasademoraImage()
//	    {
//	        User user = Authenticatr.Instance.FlickrConnection.PeopleFindByUsername("saulmora");
//
//	        PhotoCollection photos = Authenticatr.Instance.FlickrConnection.PeopleGetPublicPhotos(user.UserId).PhotoCollection;
//	    	Random random = new Random();
//
//            return Bitmap.FromStream(
//                Authenticatr.Instance.FlickrConnection.DownloadPicture(
//                    photos[random.Next(photos.Length)].SmallUrl));
//	    }
//
//	    private Image GetBuddyIcon()
//	    {
//	        string buddyIconURL = "http://photos{0}.flickr.com/buddyicons/{1}.jpg";
//	        User user = Authenticatr.Instance.FlickrConnection.PeopleFindByUsername("saulmora");
//	        Person person = Authenticatr.Instance.FlickrConnection.PeopleGetInfo(user.UserId);
//
//            return Bitmap.FromStream( 
//                Authenticatr.Instance.FlickrConnection.DownloadPicture(
//                string.Format(buddyIconURL, person.IconServer, person.UserId))
//            );
//	    }

	    protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Component Designer generated code
		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutControl));
            this.AboutLabel = new System.Windows.Forms.Label();
            this.flickrLink = new System.Windows.Forms.LinkLabel();
            this.casademoraFlickrLink = new System.Windows.Forms.LinkLabel();
            this.casademoraLink = new System.Windows.Forms.LinkLabel();
            this.projectLink = new System.Windows.Forms.LinkLabel();
            this.pictureBox2 = new System.Windows.Forms.PictureBox();
            this.buddyIconPicture = new System.Windows.Forms.PictureBox();
            this.version = new System.Windows.Forms.Label();
            this.panel1 = new System.Windows.Forms.Panel();
            this.panel4 = new System.Windows.Forms.Panel();
            this.panel3 = new System.Windows.Forms.Panel();
            this.panel2 = new System.Windows.Forms.Panel();
            this.panel6 = new System.Windows.Forms.Panel();
            this.panel5 = new System.Windows.Forms.Panel();
            this.casademoraFlickrSample = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.buddyIconPicture)).BeginInit();
            this.panel1.SuspendLayout();
            this.panel4.SuspendLayout();
            this.panel3.SuspendLayout();
            this.panel2.SuspendLayout();
            this.panel6.SuspendLayout();
            this.panel5.SuspendLayout();
            this.SuspendLayout();
            // 
            // AboutLabel
            // 
            this.AboutLabel.Font = new System.Drawing.Font("Teen Light", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.AboutLabel.Location = new System.Drawing.Point(8, 24);
            this.AboutLabel.Name = "AboutLabel";
            this.AboutLabel.Size = new System.Drawing.Size(104, 24);
            this.AboutLabel.TabIndex = 0;
            this.AboutLabel.Text = "by Saul Mora";
            // 
            // flickrLink
            // 
            this.flickrLink.AutoSize = true;
            this.flickrLink.Location = new System.Drawing.Point(16, 24);
            this.flickrLink.Name = "flickrLink";
            this.flickrLink.Size = new System.Drawing.Size(79, 13);
            this.flickrLink.TabIndex = 1;
            this.flickrLink.TabStop = true;
            this.flickrLink.Text = "www.flickr.com";
            // 
            // casademoraFlickrLink
            // 
            this.casademoraFlickrLink.AutoSize = true;
            this.casademoraFlickrLink.Location = new System.Drawing.Point(8, 24);
            this.casademoraFlickrLink.Name = "casademoraFlickrLink";
            this.casademoraFlickrLink.Size = new System.Drawing.Size(179, 13);
            this.casademoraFlickrLink.TabIndex = 2;
            this.casademoraFlickrLink.TabStop = true;
            this.casademoraFlickrLink.Text = "www.flickr.com/photos/casademora";
            // 
            // casademoraLink
            // 
            this.casademoraLink.AutoSize = true;
            this.casademoraLink.Location = new System.Drawing.Point(72, 8);
            this.casademoraLink.Name = "casademoraLink";
            this.casademoraLink.Size = new System.Drawing.Size(115, 13);
            this.casademoraLink.TabIndex = 3;
            this.casademoraLink.TabStop = true;
            this.casademoraLink.Text = "www.casademora.com";
            // 
            // projectLink
            // 
            this.projectLink.AutoSize = true;
            this.projectLink.Location = new System.Drawing.Point(16, 8);
            this.projectLink.Name = "projectLink";
            this.projectLink.Size = new System.Drawing.Size(131, 13);
            this.projectLink.TabIndex = 5;
            this.projectLink.TabStop = true;
            this.projectLink.Text = "flickrshots.sourceforge.net";
            // 
            // pictureBox2
            // 
            this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
            this.pictureBox2.Location = new System.Drawing.Point(8, 8);
            this.pictureBox2.Name = "pictureBox2";
            this.pictureBox2.Size = new System.Drawing.Size(106, 35);
            this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.pictureBox2.TabIndex = 6;
            this.pictureBox2.TabStop = false;
            // 
            // buddyIconPicture
            // 
            this.buddyIconPicture.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.buddyIconPicture.Location = new System.Drawing.Point(128, 8);
            this.buddyIconPicture.Name = "buddyIconPicture";
            this.buddyIconPicture.Size = new System.Drawing.Size(48, 48);
            this.buddyIconPicture.TabIndex = 7;
            this.buddyIconPicture.TabStop = false;
            // 
            // version
            // 
            this.version.Location = new System.Drawing.Point(8, 8);
            this.version.Name = "version";
            this.version.Size = new System.Drawing.Size(100, 16);
            this.version.TabIndex = 8;
            this.version.Text = "v 0.1";
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.panel4);
            this.panel1.Controls.Add(this.panel3);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel1.Location = new System.Drawing.Point(0, 272);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(365, 48);
            this.panel1.TabIndex = 9;
            // 
            // panel4
            // 
            this.panel4.Controls.Add(this.casademoraFlickrLink);
            this.panel4.Controls.Add(this.casademoraLink);
            this.panel4.Dock = System.Windows.Forms.DockStyle.Right;
            this.panel4.Location = new System.Drawing.Point(165, 0);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(200, 48);
            this.panel4.TabIndex = 7;
            // 
            // panel3
            // 
            this.panel3.Controls.Add(this.flickrLink);
            this.panel3.Controls.Add(this.projectLink);
            this.panel3.Dock = System.Windows.Forms.DockStyle.Left;
            this.panel3.Location = new System.Drawing.Point(0, 0);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(160, 48);
            this.panel3.TabIndex = 6;
            // 
            // panel2
            // 
            this.panel2.Controls.Add(this.panel6);
            this.panel2.Controls.Add(this.pictureBox2);
            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel2.Location = new System.Drawing.Point(0, 0);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(365, 64);
            this.panel2.TabIndex = 10;
            // 
            // panel6
            // 
            this.panel6.Controls.Add(this.AboutLabel);
            this.panel6.Controls.Add(this.buddyIconPicture);
            this.panel6.Controls.Add(this.version);
            this.panel6.Dock = System.Windows.Forms.DockStyle.Right;
            this.panel6.Location = new System.Drawing.Point(181, 0);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(184, 64);
            this.panel6.TabIndex = 9;
            // 
            // panel5
            // 
            this.panel5.Controls.Add(this.casademoraFlickrSample);
            this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel5.Location = new System.Drawing.Point(0, 64);
            this.panel5.Name = "panel5";
            this.panel5.Size = new System.Drawing.Size(365, 208);
            this.panel5.TabIndex = 11;
            // 
            // casademoraFlickrSample
            // 
            this.casademoraFlickrSample.Dock = System.Windows.Forms.DockStyle.Fill;
            this.casademoraFlickrSample.Location = new System.Drawing.Point(0, 0);
            this.casademoraFlickrSample.Name = "casademoraFlickrSample";
            this.casademoraFlickrSample.Size = new System.Drawing.Size(365, 208);
            this.casademoraFlickrSample.TabIndex = 0;
            // 
            // AboutControl
            // 
            this.Controls.Add(this.panel5);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel1);
            this.Name = "AboutControl";
            this.Size = new System.Drawing.Size(365, 320);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.buddyIconPicture)).EndInit();
            this.panel1.ResumeLayout(false);
            this.panel4.ResumeLayout(false);
            this.panel4.PerformLayout();
            this.panel3.ResumeLayout(false);
            this.panel3.PerformLayout();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            this.panel6.ResumeLayout(false);
            this.panel5.ResumeLayout(false);
            this.ResumeLayout(false);

        }
		#endregion
	}
}
